package ch10;

import java.util.Scanner;

public class Zxf3 {
        public static void main(String[] args) {
            Scanner in=new Scanner(System.in);
            System.out.println("请输入数组数据：");
            int[] a=new int[4];
            String[] c=new String[15];
            for (int i=0;i<a.length;){
                int b=in.nextInt();
                String d=in.next();
                if (!(b>=0&&b<=100)){
                    System.out.println("输入错误；请重新输入：");
                    continue;
                }
                a[i]=b;
                c[i]=d;
                i++;
            }
            for (int i=0;i<a.length;i++){
                System.out.print("同学："+c[i]+"的成绩为："+a[i]);
            }
        }
    }

